package com.devops.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.devops.admin.model.DOSProjectGroup;
import com.devops.admin.model.DOSProjectGroupPo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassNem DOSProjectGroupMapper
 * @Description TODO
 * @Author heyabo
 * @Date 2022/3/21 15:59
 * @Version 1.0
 **/
@Mapper
public interface DOSProjectGroupMapper extends BaseMapper<DOSProjectGroup> {

    /**
     * @Author heyabo
     * @Description 根据人员角色信息查询项目组和项目的级联
     * @Date 10:46 2022/7/22
     * @Param []
     * @return java.util.List<com.devops.admin.model.DOSProjectGroupPo>
     **/
    List<DOSProjectGroupPo> getCascadeByUserId(String userId);

    List<DOSProjectGroupPo> getCascadeAdmin();

    /**
     * @Author heyabo
     * @Description 根据登录用户id查询项目组
     * @Date 17:41 2022/9/14
     * @Param [id]
     * @return java.util.List<com.devops.admin.model.DOSProjectGroup>
     **/
    List<DOSProjectGroup> getProjectGroupByUserid(String userId);

    /**
     * @Author heyabo
     * @Description 查询名称相似度
     * @Date 17:29 2022/11/14
     * @Param [groupName]
     * @return java.lang.String
     **/
    List<String> getSimilarProjectGroupName(String groupName,Double similarityLimit);
}
